public class ComplexDriver {
    public static void main(String[] args) {
        Complex c1 = new Complex(10, 15);
        
        // The following involves a copy constructor call
        Complex c2 = new Complex(c1);

        // Note that the following does not involve a copy constructor call as 
        // non-primitive variables are just references.
        Complex c3 = c2; 
        	
        System.out.println("Before modifying c2:");
        System.out.println("c1 is " + c1);
        System.out.println("c2 is " + c2);
        System.out.println("c3 is " + c3);  

        //Modify c2
        c2.setRealPart(8.0);
        c2.setImaginaryPart(3.5);
        
        System.out.println("\nAfter modifying c2:");
        System.out.println("c1 is " + c1);
        System.out.println("c2 is " + c2);
        System.out.println("c3 is " + c3);
    }
}